package com.crm.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 任务记录
 * </p>
 *
 * @author zjd
 * @since 2021-04-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("user_task")
@ApiModel(value="Task对象", description="任务记录")
public class Task extends Model {

    private static final long serialVersionUID = 1L;
    @TableId(type=IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "操作索引 公司id 交易id 票证id")
    private Long indexId;

    @ApiModelProperty(value = "操作类型 （公司 交易 票证）")
    private Long type;

    @ApiModelProperty(value = "日期类型 明天 一个星期之内")
    private Long dayType;

    @ApiModelProperty(value = "截止日期")
    private Date dueDate;

    @ApiModelProperty(value = "状态 (等待中，邮件，打电话)")
    private Long state;

    @ApiModelProperty(value = "重要程度")
    private Long priority;

    @ApiModelProperty(value = "大头钉")
    private Long pin;

    @ApiModelProperty(value = "创建用户id")
    private Long createUserId;

    @ApiModelProperty(value = "联系时间")
    private LocalDateTime contactedTime;

    @ApiModelProperty(value = "电子邮件提醒 （0不提醒 1自定义时间 3一周之前 ）")
    private Long emailReminder;

    @ApiModelProperty(value = "电子邮件提醒时间")
    private LocalDateTime emailReminderData;

    @ApiModelProperty(value = "描述")
    private String describe;



    @ApiModelProperty(value = "被分配任务用户id")
    private Long assignedUserId;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableLogic
    private Long isDelete;

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Long version;

    @ApiModelProperty(value = "队列")
    private Long queueId;


}
